use $data/Table_7_Final.dta, replace

// EMAILS OPENED
foreach j in Health Financial{

quietly sum emailsopened if group_name=="`j'" 
local mean=round(`r(mean)',.01)
local sd=round(`r(sd)',.01)
local min=round(`r(min)',.01)
local max=round(`r(max)',.01)

display "`j'&`mean'&`sd'&`min'&`max'"
}
//

// NUMBER OF SESSIONS
foreach j in Health Financial{

quietly sum numberofsessions if group_name=="`j'" 
local mean=round(`r(mean)',.01)
local sd=round(`r(sd)',.01)
local min=round(`r(min)',.01)
local max=round(`r(max)',.01)

display "`j'&`mean'&`sd'&`min'&`max'"
}
//


// HEADER FOR TABLE 7. THE TABLE IN THE PAPER
// IS SPLIT IN TO TWO PARTS
display "Group&Mean&Std. Dev.&Min&Max"



/*
// THIS DO FILE WILL PRODUCE THIS OUTPUT 
COPY AND PASTE THIS INTO WORD, HIGHLIGHT, AND CONVERT TEXT TO TABLE USING THE & AS THE DELIMITER
// ROWS 2 AND 3 ARE FOR EMAILS OPENED AND ROWS 4 AND 5 ARE FOR THE NUMBER OF SESSIONS


Group&Mean&Std. Dev.&Min&Max
Health&10.33&2.58&6&13
Financial&8.67&5.43&0&13
Health&6&7.16&0&16
Financial&1.83&1.94&0&5
